/*
 * @author: Gene
 * @age: 永远18岁的美少年
 * @Email：: yangjianyun@58.com
 * @Date: 2021-12-02 21:41:37
 * @LastEditTime: 2021-12-02 22:07:38
 * @description: $1
 */
export {};
type SplitString<
  T,
  S extends string,
  A extends any[] = []
> = T extends `${infer L}${S}${infer R}`
  ? SplitString<R, S, [...A, L]>
  : [...A, T];
type A1 = SplitString<"handle-open-flag", "-">;
type A2 = SplitString<"open-flag", "-">;
type A3 = SplitString<"handle.open.flag", ".">;
type A4 = SplitString<"open.flag", ".">;
type A5 = SplitString<"open.flag", "-">;
